package net.adetech.crj.service;

import net.adetech.crj.dao.NoticeMapper;
import net.adetech.crj.entity.Notice;
import net.adetech.crj.utils.InnerServiceUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

@Service("notice.getByType")
public class GetNoticeByTypeService implements BaseService{
    @Autowired
    NoticeMapper noticeMapper;
    @Override
    public Map<String, Object> invoke(Map<String, Object> params) {
        int type = (Integer)params.get("type");
        Notice notice = noticeMapper.getNoticeByType(type);

        return InnerServiceUtil.buildResult("notice",notice);
    }
}
